package utils;

import program.DatabaseConnection;

/**
 * @author wojtek
 *
 */
public class Color {
	private Integer Id;
	private Integer R;
	private Integer G;
	private Integer B;
	public Integer getR() {
		return R;
	}
	public void setR(Integer r) {
		R = r;
	}
	public Integer getG() {
		return G;
	}
	public void setG(Integer g) {
		G = g;
	}
	public Integer getB() {
		return B;
	}
	public void setB(Integer b) {
		B = b;
	}
	public Color(Integer r, Integer g, Integer b) {
		super();
		R = r;
		G = g;
		B = b;
	}
	
	public void AddToDatabase()
	{
		DatabaseConnection.AddColor(ToDatabase());
	}
	
	public String ToDatabase()
	{
		String toReturn = R.toString() + "," +
		G.toString() + "," +
		B.toString();
		return toReturn;
	}
	
}
